#ifndef CCORE__
#define CCORE__

#include <windows.h>
#include <windowsx.h>
#include <d3d9.h>
#include <d3dx9.h>
#include "CCamera.h"
#include "CInput.h"
#include "CTimer.h"
#include "..\\Util\\CErrorLogger.h"


struct Options{
  int windowHeight;
  int windowWidth;
};

namespace GameCore
{
class CCore
{
public:
	CCore::~CCore();

	//access to the core
	static CCore* getCore();

	//set the Device
	void setDevice(LPDIRECT3DDEVICE9);

	//get the Device
	LPDIRECT3DDEVICE9 getDevice(void);

	//set the window handler
	void setHWND(const HWND);

	//get the window handler
	HWND getHWND(void);

	CCamera* getCamera(void);

	CInput* getInput(void);

	CTimer* getTimer(void);
private:
	//pointer to device
	LPDIRECT3DDEVICE9 pD3DDevice;

	CCamera* pCamera;
	CInput* pInput;
	CTimer* pTimer;

	//window handler
	HWND hwnd;

	//structure to store options
	struct Options options;

	//only instance of the Core
	static CCore* pCoreInstance;

protected:
	
	//constructor, needed when creating the core;
	CCore();

};

//initializing class variable

}//namespace GameCore

#endif